package com.cs.archivesmanagement.entity;

import javax.persistence.*;

/**
 * Created by amo on 2015/8/21.
 */
@Entity
@Table(name = "am_file_type", schema = "", catalog = "csam")
public class AmFileType {
    private int fileTypeId;
    private String fileTypeName;





    public  AmFileType(Integer fileTypeId){

        this.fileTypeId=fileTypeId;

    }



    public  AmFileType(){


    }

    @Id
    @Column(name = "File_type_id", nullable = false, insertable = true, updatable = true)
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    public int getFileTypeId() {
        return fileTypeId;
    }

    public void setFileTypeId(int fileTypeId) {
        this.fileTypeId = fileTypeId;
    }

    @Basic
    @Column(name = "File_type_name", nullable = true, insertable = true, updatable = true, length = 20)
    public String getFileTypeName() {
        return fileTypeName;
    }

    public void setFileTypeName(String fileTypeName) {
        this.fileTypeName = fileTypeName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        AmFileType that = (AmFileType) o;

        if (fileTypeId != that.fileTypeId) return false;
        if (fileTypeName != null ? !fileTypeName.equals(that.fileTypeName) : that.fileTypeName != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = fileTypeId;
        result = 31 * result + (fileTypeName != null ? fileTypeName.hashCode() : 0);
        return result;
    }
}
